AutoPlay
Java • WPILib • Eclipse • Threading • Sockets • Control System
Mar 2017 - Apr 2017

After finishing the brunt of the drive code for the FRC competition, my project team didn’t have much to do. As a result, we decided to start on a new project. Since each game has both an autonomous and teleop (joystick controlled) section, we had the idea to make a project that would reproduce actions done in teleop during autonomous mode. This gave birth to AutoPlay.

By using AutoPlay, the robot would replay movements and commands running from previously recorded teleop sessions. The program receives the values from sensors every 10 milliseconds using a Java client and writes them into a text file while the robot is running with another Java client. It also records if commands are running or not.

We utilized many threads to record the values, to send them to the server, and to replay them in autonomous mode. We used ArrayBlockingQueue to accumulate values and send them every second rather than every 10 milliseconds to prevent errors from server lag. Another client was used to get the values from the text file and overwrite the Java file. Using the values from the text file, a Java file is overwritten with the new values. The program can then be switched to autonomous mode and replay the new values. This would allow our team to create autonomous code in minutes, rather than weeks.


©2021 by Julia Shuieh